add_executable(deferred-renderer-cpp WIN32 MACOSX_BUNDLE
    deferredrenderer.cpp deferredrenderer.h
    finaleffect.cpp finaleffect.h
    gbuffer.cpp gbuffer.h
    main.cpp
    pointlightblock.cpp pointlightblock.h
    sceneeffect.cpp sceneeffect.h
    sceneentity.cpp sceneentity.h
    screenquadentity.cpp screenquadentity.h
)
target_link_libraries(deferred-renderer-cpp PRIVATE
    Qt${QT_VERSION_MAJOR}::3DCore
    Qt${QT_VERSION_MAJOR}::3DExtras
    Qt${QT_VERSION_MAJOR}::3DInput
    Qt${QT_VERSION_MAJOR}::3DRender
    Qt${QT_VERSION_MAJOR}::Core
    Qt${QT_VERSION_MAJOR}::Gui
)


# Resources:
set(deferred-renderer-cpp_resource_files
    "final_gl2.frag"
    "final_gl2.vert"
    "final_gl3.frag"
    "final_gl3.vert"
    "geometry_gl2.frag"
    "geometry_gl2.vert"
    "geometry_gl3.frag"
    "geometry_gl3.vert"
)

qt_add_resources(deferred-renderer-cpp "deferred-renderer-cpp"
    PREFIX
        "/"
    FILES
        ${deferred-renderer-cpp_resource_files}
)

install(TARGETS deferred-renderer-cpp
    BUNDLE DESTINATION .
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

# Consider using qt_generate_deploy_app_script() for app deployment if
# the project can use Qt 6.3. In that case rerun qmake2cmake with
# --min-qt-version=6.3.
